import Mian from "../view/MianView.vue";
import NotFound from "../view/404View.vue";
import MyPage from "../view/MyPage/index.vue";
export default [
  {
    path: "/",
    name: "root",
    component: Mian,
    redirect: "/home",
    children: [
      {
        path: "home",
        name: "Home",
        meta: {
          info: "首页",
          checking: true,
        },
        component: () => import("../view/HomeView.vue"),
      },
      {
        path: "user",
        name: "User",
        meta: {
          info: "用户管理",
          checking: true,
        },
        component: () => import("../view/UserView.vue"),
      },
      {
        path: "mall",
        name: "Mall",
        meta: {
          info: "商品管理",
          checking: true,
        },
        component: () => import("../view/MallView.vue"),
      },
      {
        path: "/other",
        name: "Other",
        meta: {
          info: "其他",
        },
        redirect: "pageOne",
        children: [
          {
            path: "pageOne",
            name: "pageOne",
            meta: {
              info: "page1",
              checking: true,
            },
            component: () => import("../view/OtherPage/OneView.vue"),
          },
          {
            path: "pageTwo",
            name: "pagrTwo",
            meta: {
              info: "page2",
              checking: true,
              isSuper: true,
            },
            component: () => import("../view/OtherPage/TwoView.vue"),
          },
        ],
      },
    ],
  },
  {
    path: "/my",
    name: "My",
    component: MyPage,
  },
  {
    path: "/login",
    name: "Login",
    component: () => import("../view/LoginView.vue"),
  },

  {
    path: "/:pathMatch(.*)*",
    name: "NotFound",
    component: NotFound,
  },
];
